<?php
session_start();

if(!isset($_SESSION['id'])){
	header('Location:login.php');
}
 $id=$_POST['id'];
 $connection=mysql_connect("localhost","root","");
 mysql_select_db("shenji",$connection);
 mysql_query("set names utf8");
 $sql="select * from shenji where id=$id";
 $result=mysql_query($sql);
 $row=mysql_fetch_array($result);
 echo json_encode($row);

?>